package com.mxpio.erp.workshop.policy.impl;

import java.util.List;

import com.mxpio.erp.common.enums.NoticeStatusEnums;
import com.mxpio.erp.common.enums.OrderEnums;
import com.mxpio.erp.common.order.policy.AbstractBizOrderPolicy;
import com.mxpio.erp.common.order.policy.OrderContext;
import com.mxpio.erp.common.vo.OrderExcuteLineVo;
import com.mxpio.erp.common.workshop.entity.MoInNotice;

/**
 * 生产订单执行策略
 * @author mxpio
 *
 */
public class DefaultExecuteMoPolicy extends AbstractBizOrderPolicy {
	
	private List<OrderExcuteLineVo> orderExcuteVos;
	
	public DefaultExecuteMoPolicy(List<OrderExcuteLineVo> orderExcuteVos) {
		this.orderExcuteVos = orderExcuteVos;
	}
	
	@Override
	public void execute(OrderContext context) {
		
	}
	
	@Override
	public OrderContext config(OrderContext context) {
		context.setOrderExcuteVos(orderExcuteVos);
		context.setNoticeClass(MoInNotice.class);
		context.setAccessType(OrderEnums.AccessType.IN.getCode());
		context.setPickingType(NoticeStatusEnums.NoticeType.MO_IN.getCode());
		return context;
	}

	@Override
	public boolean beforeExecute(OrderContext context) {
		return true;
	}

	@Override
	public void afterExecute(OrderContext context) {
		
	}

}
